package com.atguigu.eduservice.service;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.frontvo.CourseFrontVo;
import com.atguigu.eduservice.entity.frontvo.CourseWebVo;
import com.atguigu.eduservice.entity.vo.CourseListQuery;
import com.atguigu.eduservice.entity.vo.CoursePublish;
import com.atguigu.eduservice.entity.vo.CourseQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author zhaolie
 * @since 2020-12-08
 */
public interface EduCourseService extends IService<EduCourse> {

    /**
     * 添加课程基本信息
     * @param courseQuery
     * @return
     */
    String saveCourseInfo(CourseQuery courseQuery);

    /**
     * 查询课程基本信息
     * @param courseId
     * @return
     */
    CourseQuery getCourseInfo(@Param("courseId") String courseId);

    /**
     * 修改课程基本信息
     * @param courseQuery
     */
    void updateCourseInfo(CourseQuery courseQuery);

    /**
     * 发布课程
     * @param courseId
     * @return
     */
    CoursePublish publishCourseInfo(String courseId);

    /**
     * 确认发布课程
     * @param courseId
     * @return
     */
    void publishCourse(String courseId);

    /**
     * 查询课程列表
     * @return
     */
    Map pageCourseCondition(Long current, Long limit, CourseListQuery courseListQuery);

    /**
     * 删除课程
     * @param courseId
     */
    void deleteCourse(String courseId);

    /**
     * 按条件和分页查询课程列表
     * @param courseFrontVo
     * @param current
     * @param limit
     * @return
     */
    Map<String, Object> getCourseList(CourseFrontVo courseFrontVo, Long current, Long limit);

    /**
     * 查询课程详情
     * @param courseId
     * @return
     */
    CourseWebVo getBaseCourseInfo(String courseId);
}
